package com.bwie.controller;

import com.bwie.pojo.Brand;
import com.bwie.pojo.Type;
import com.bwie.service.BrandService;
import com.bwie.utils.R;
import com.bwie.utils.Result;
import com.bwie.vo.PageInfoVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: TaoShiHao
 * @Date: 2025/5/23 16:29
 * @Description:
 **/
@RestController
@RequestMapping("/shop/index")
@Api(tags = "商品管理")
public class IndexController {

    @Autowired
    BrandService brandService;
    @PostMapping("/getBrandList")
    @ApiOperation(value = "分页获取品牌列表")
    public Result getBrandList(@RequestBody PageInfoVo pageInfoVo){
        return brandService.getBrandList(pageInfoVo);
    }
    @PostMapping("/addBrand")
    @ApiOperation(value = "添加品牌")
    public Result addBrand(@RequestBody Brand brand){
        return brandService.addBrand(brand);
    }

    @PostMapping("/UpdateBrandStatus")
    @ApiOperation(value = "修改品牌状态")
    public Result UpdateBrandStatus(@RequestBody Brand brand){
        return brandService.UpdateBrandStatus(brand);
    }

}
